#!/usr/bin/make -f
# -*- makefile -*-

# StaffLog Services - Predesys services
# Version: 0.1
# Authors: Jose A. Jimenez <jajimc@gmail.com>, Miguel Centeno <miguelcent@gmail.com>
# License: GPL 3.0 (see "license" file)

DESTDIR			= ""
DEST_MAINDIR 	= $(DESTDIR)/usr/share/predesys-server/services

SRC_MAINDIR		= src

compile:

install:	basic-install

basic-install:
	# Directories creation
	mkdir -p $(DEST_MAINDIR)
	
	# Program files installation
	install -p -m 0644 $(SRC_MAINDIR)/stafflog_setup.py $(DEST_MAINDIR)
	install -p -m 0644 $(SRC_MAINDIR)/stafflog_checkin.py $(DEST_MAINDIR)
	install -p -m 0644 $(SRC_MAINDIR)/install_db.py $(DEST_MAINDIR)
	install -p -m 0644 $(SRC_MAINDIR)/uninstall_db.py $(DEST_MAINDIR)
	install -p -m 0644 $(SRC_MAINDIR)/install_stafflog.sql $(DEST_MAINDIR)
	install -p -m 0644 $(SRC_MAINDIR)/uninstall_stafflog.sql $(DEST_MAINDIR)

uninstall:
	# Program files deletion
	rm $(DEST_MAINDIR)/stafflog_setup.py
	rm $(DEST_MAINDIR)/stafflog_checkin.py
	rm $(DEST_MAINDIR)/install_db.py
	rm $(DEST_MAINDIR)/uninstall_db.py
	rm $(DEST_MAINDIR)/install_stafflog.sql
	rm $(DEST_MAINDIR)/uninstall_stafflog.sql
